import { RouteRecordRaw } from 'vue-router'

export const routes: RouteRecordRaw[] = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@renderer/pages/Login/index.vue')
  },
  {
    path: '/',
    name: 'home',
    redirect: '/message',
    component: () => import('@renderer/pages/home/index.vue'),
    children: [
      {
        path: '/message',
        name: 'message',
        component: () => import('@renderer/pages/message/index.vue'),
        children: [
          {
            path: '/chat',
            name: 'message-chat',
            component: () => import('@renderer/pages/chat/index.vue')
          }
        ]
      },
      {
        path: '/user',
        name: 'user',
        redirect: '/user/empty',
        component: () => import('@renderer/pages/list/index.vue'),
        children: [
          {
            path: '/user/empty',
            name: 'empty',
            component: () => import('@renderer/pages/empty/index.vue')
          },
          {
            path: '/user/search',
            name: 'search',
            component: () => import('@renderer/pages/search/index.vue')
          },
          {
            path: '/user/newFriend',
            name: 'newFriend',
            component: () => import('@renderer/pages/new-friend/index.vue')
          }
        ]
      },
      {
        path: '/setting',
        name: 'setting',
        redirect: '/setting/user',
        component: () => import('@renderer/pages/set/index.vue'),
        children: [
          {
            name: 'set_user',
            path: '/setting/user',
            component: () => import('@renderer/pages/set-user/index.vue')
          },
          {
            name: 'file',
            path: '/setting/file',
            component: () => import('@renderer/pages/set-file/index.vue')
          },
          {
            name: 'about',
            path: '/setting/about',
            component: () => import('@renderer/pages/set-about/index.vue')
          }
        ]
      }
    ]
  }
]
